Machine tool control process and apparatus therefor

ABSTRACT

A machine tool control process employs an N.C. and separate software e.g. operating either in a separate processor or within the N.C. Sub-programs generated by the software may be introduced into the N.C. during pauses in the N.C. e.g. for measurement type inspection or re-configuring the paths of cutting tools. The generation of the sub-programs may be carried out whilst the N.C. is operating.

[0001] This invention relates to the control of machine tools having anumeric controller and ancillary computer control.

[0002] Conventionally machine tool control has been provided by systemssimilar to that shown in FIG. 1. They provide a programmable machinetool controller (called a numeric controller (NC)) which turns commandcodes into actual machine movements, rests, and cutting actions etc. TheNC has programmable logic, processing ability, and is linked to someuser interface (man-machine connection (MMC)).

[0003] Recently the MMC has been replaced in some instances with acomputer running a commercially available operating system so that OEM'sand third party software developers can introduce their own software.

[0004] Further developments have allowed access by OEM and third partysoftware to the machine data such as program status, machine positionand machine variables and the ability to transfer command code programsto and from the NC and MMC. Such access is gained by an interface knownas an application programming interface (API).

[0005] However, such a system is limited because it is not possible tochange command programs once they are running on the NC, but merely tooverride feed rates and to press the cycle stop button.

[0006] According to one aspect the present invention provides a machinetool control process employing a programmable machine tool controllerand separate software, comprising the steps of:

[0007] executing a program in the machine tool controller; and

[0008] providing a step in the program which allows the programexecution to be paused until the controller is signalled to continue bythe separate software.

[0009] Preferably the separate software and machine tool controllercommunicate via an API.

[0010] Preferably the said step in the program is a pause caused by thecontroller's optional stop instruction being invoked, and wherein theexternal software restarts the NC program via the API.

[0011] Alternatively the said step in the program is a pause caused bythe controller waiting for a variable used by the controller to bechanged by the separate software.

[0012] Preferably the machine tool control process further includes thesteps of:

[0013] loading a sub-program to the machine tool controller before orduring the step in the program; and

[0014] running the sub-program after the step in the program.

[0015] Preferably the machine tool control process is repeated so that asubsequent sub-program is loaded to the machine tool controller.

[0016] Preferably the separate software is employed to generateinstructions within the sub-program(s). Preferably the generation takesplace whilst the program or sub-program is running.

[0017] According to another aspect the invention provides a machine toolcontrol process employing a programmable machine tool controller andseparate software, comprising the steps of:

[0018] executing a program in the machine tool controller;

[0019] operating the separate software to generate instructions within asub-program during the machine tool process; and

[0020] providing a step in the program which allows the sub-program tobe performed.

[0021] Preferably the generation of the instructions by the separatesoftware takes place following input into the separate software.

[0022] The invention extends to a software program suitable for theabove processes.

[0023] Embodiments of the invention will now be described with referenceto the drawings, in which:

[0024]FIG. 1 shows a machine control arrangement;

[0025]FIG. 2 shows another machine control arrangement;

[0026]FIG. 3 shows a flow chart of a process control utilising theinvention;

[0027]FIGS. 4a and 4 b show flow charts of a process control utilisingfurther the invention; and

[0028]FIGS. 5a and 5 b show flow charts for a process further utilisingthe invention.

[0029]FIG. 1 shows a process control arrangement for a machine tool. Amachine tool is controlled by a programmable machine tool controller,usually called a numeric control (NC). The system shown has openarchitecture and therefore, access to data at the NC is possible via anapplication programming interface (API). In this description an APIembraces any software which allows communication between two processes.Any communication protocol can be used depending on the type ofproprietary NC used e.g. Dynamic Data Exchange (DDE). The MMC is used toload programs of “G code” commands into the NC via the API. In thissystem there is an additional external processor in this instance anexternal PC which communicates with the NC via the API also and hasseparate software which operates an external control process. The PC isused to load programs into the NC, to read the data of the NC and tocontrol the program sequence of the NC.

[0030]FIG. 2 shows a similar arrangement to that illustrated in FIG. 1.The external processor is integrated into the machine tool controllerbut is still external in the sense that an external process distinctfrom the NC, communicates via the API. Separate software is utilisedalso.

[0031] Typically the arrangement of FIG. 1 might be used whereretrofitting of a system for operating the invention were performed. Thearrangement of FIG. 2 might be used where a system for operating theinvention were newly built, and/or the software on the MMC allows eitherby design or unintentionally the integration of third party software.

[0032]FIG. 3 shows one example of a machine tool process utilising theprocess of the invention. Where for example it is required to takeinformation from an NC (e.g. the X,Y,Z position of a machine toolspindle which is holding a measurement probe which is currentlysignalling that it is touching a workpiece surface) then the controlprocess is looped until the data is read by the external process. Theexternal process then sets a variable within the NC to a “continuing”value and the process continues. Such a control process allows thedynamic reading and writing of data at the NC without resetting the NC.

[0033] As an alternative to setting a variable, the machine's “optionalstop” instruction may be used and the external process may be used torestart the process.

[0034]FIGS. 4a and 4 b show another machine tool control processemploying the process of the invention. FIG. 4a shows the NC processwhilst FIG. 4b shows the separate software process. Both processes arerun concurrently and communication between the two takes place via anAPI as illustrated in FIG. 3. Some NCs have the ability to accept oneline of command code at a time only, known as “drip-feed” mode.Typically downloading of the program takes place using an external tapereader or computer, with each line being executed soon after it isreceived. Drip-feed mode is provided for NCs to allow large programs tobe held using external storage medium such as a PC or a paper ormagnetic tape reader, and fed to the controller in small sections (oftena line at a time). The sections are executed immediately and thendiscarded. In this way programs that may be too large to fit in thecontrollers memory can be run.

[0035] One embodiment of the invention enables drip feed mode to beprovided on NC devices that do not readily support it.

[0036] This is done by running a program on the NC which continuallyruns the following loop while a synchronisation variable in the programis not equal to the value used to exit drip feed:

[0037] i) set the synchronisation variable to a value that will causethe program to wait;

[0038] ii) wait for the synchronisation variable to have another valuethat will indicate that the subprogram is ready;

[0039] iii) call the subprogram;

[0040] Additionally, while this program is running on the NC, a separateprocess is running using separate software which in turn runs thefollowing loop while there are more lines to drip feed:

[0041] i) get the next line(s) to be drip fed;

[0042] ii) format the line(s) as a subprogram

[0043] iii) wait until the NC is ready for a that subprogram i.e. iswaiting for the subprogram;

[0044] iv) upload that subprogram to the NC

[0045] v) set the synchronisation value to a value that allows the NCprogram to run the sub-program

[0046] An advantage of such a process control is that any line of codecan be changed as the process progresses. So, for example where analteration to a tool path is required as a result of an inspection stepperformed by the process, then that alteration can be made to a commandline or lines prior to downloading. This alteration can take place inthe separate software of the external processor whilst the NC programruns.

[0047] At the end of the process the external process is used to set thevariable to a process stop value and the process is then terminated.

[0048]FIGS. 5a and 5 b show further flow charts for yet another processfor controlling a machine tool utilising the invention. In this systemthe NC and external process functions are similar to those describedabove. Again FIG. 5a shows the NC process whilst FIG. 5b shows theseparate software process. Communication between the two is via an API.Instead of feeding a line of code the external processor is used togenerate a sub-program (perhaps many lines of code long) which isinserted into the main program running on the NC. The downloading of thesub-program may take place at any time after its creation by, or arrivalat the external process but before the external process sets thevariable to the value which indicates that the NC may call and run thatsub-program.

[0049] In a process where a machine is used to produce a workpiece it isoften necessary to check that that component is correctly produced e.g.that its dimensions or surface finish are satisfactory. An inspectionroutine will be required for such checking and it may be necessary toadjust parameters of the process to produce a satisfactory workpiece.

[0050] In the process illustrated, the external process is capable ofgenerating a workpiece-checking sub-program.

[0051] The information required to do this may be input into thesub-program from one or a combination of places i.e. the main programwhich may or may not be running in the NC and/or from an external datasource e.g. previous inspection sub-programs, and/or from userinteraction. Once the sub-program is complete it may be downloaded tothe NC (via the API) and the external process will set the variable inthe NC to a “run sub-program” value. As detailed previously the NC mainprogram is delayed and waits for that variable to be set by the externalprocess. Once set the NC calls and runs the current sub-program.

[0052] Any number of sub-programs may be run during the process. Eachsub-program may be different. For example an iterative process may takeplace whereby:

[0053] a main program operates a machining cycle to produce an article;

[0054] a sub-program is generated from the “G code” command lines of themain program, so as to inspect the dimensions of the workpiece producedby the main program;

[0055] the data is read by the external processor (maybe using theprocess described with respect to FIG. 3);

[0056] the main program is continued; and

[0057] a further sub-program is generated by the external process takinginto account the inspection results of the first sub-program, thisfurther program containing “G” code command lines to re-machine theworkpiece correctly, or to alter the nominal cutting path of the machineso that further workpieces may be machined more accurately.

[0058] In the above example the process may be ongoing.

[0059] Reference is made in the description above to variables. Inpractice these are specific machine parameters like X,Y,Z coordinates,but the variable used to set the “run sub-program” or “don't runsub-program” flag will be a normally unused variable. It may be aninteger or floating point variable or an on/off type variable, so mayhave a value or a state.

[0060] The external processor or process may be an industrial PC havingstandard architecture or a processor integrated into the NC device. Thusthe “separate software” referred to in the claims may be incorporated ina device external to the NC or may be incorporated in the NC deviceitself as a parallel task. The external process referred to above is theseparate software running on either an external processor or a processorintegrated into the NC device.

[0061] Sub-programs in this application means any additionalinstructions to the NC device and includes macros used by the NC device.

1. A machine tool control process employing a programmable machine toolcontroller and separate software, comprising the steps of: executing aprogram in the machine tool controller; and providing a step in theprogram which allows the program execution to be paused until thecontroller is signalled to continue by the separate software.
 2. Amachine tool control process as claimed in claim 1 wherein the separatesoftware and machine tool controller communicate via an applicationsprogramming interface.
 3. A machine tool control process as claimed inclaim 2 wherein the said step in the program is a pause caused by thecontroller's optional stop instruction being invoked, and wherein theexternal software restarts the NC program via the applicationsprogramming interface.
 4. A machine tool control process as claimed inclaim 1 wherein the said step in the program is a pause caused by thecontroller waiting for a variable used by the controller to be changedby the separate software.
 5. A machine tool control process as claimedin claim 1, wherein the machine tool control process further includesthe steps of: loading a sub-program to the machine tool controllerbefore or during the step in the program; and running the sub-programafter the step in the program.
 6. A machine tool control process asclaimed in claim 5 wherein the machine tool process is repeated so thata subsequent sub-program is loaded to the machine tool controller.
 7. Amachine tool control process as claimed in claim 5 wherein the separatesoftware is employed to generate instructions within the sub-program(s).8. A machine tool control process as claimed in claim 7 wherein thegeneration takes place whilst the program or sub-program is running. 9.A machine tool control process employing a programmable machine toolcontroller and separate software, comprising the steps of: executing aprogram in the machine tool controller; operating the separate softwareto generate instructions within a sub-program during the machine toolprocess; and providing a step in the program which allows thesub-program to be performed.
 10. A machine tool control process asclaimed in claim 9 wherein the generation of the instructions by theseparate software takes place following input into the separatesoftware.
 11. A machine tool control process as claimed in claim 2wherein the machine tool control process further includes the steps of:loading a sub-program to the machine tool controller before or duringthe step in the program; and running the sub-program after the step inthe program.
 12. A machine tool control process as claimed in claim 3wherein the machine tool control process further includes the steps of:loading a sub-program to the machine tool controller before or duringthe step in the program; and running the sub-program after the step inthe program.
 13. A machine tool control process as claimed in claim 4wherein the machine tool control process further includes the steps of:loading a sub-program to the machine tool controller before or duringthe step in the program; and running the sub-program after the step inthe program.
 14. A machine tool control process as claimed in claim 6wherein the separate software is employed to generate instructionswithin the sub-program(s).